<template>
<!--  {{timezone}}-->
  <n-text v-if="!time">无</n-text>
  <n-time :time="time" v-if="time && time!==0 && props.type!=='relative'" :type="'datetime'"  :time-zone="timezone"></n-time>
  <n-time :time="time" v-if="time && time!==0 && props.type==='relative'" :type="'relative'" :to="0" :time-zone="timezone"></n-time>
</template>
<script lang="ts" setup>
import {TimeMentionModal} from "@/views/model/model";
import {computed, defineComponent} from "vue";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore()
const timezone = computed(()=>{
  return userStore.timezone;
})
const props = defineProps(['time','type'])

</script>